package com.newland.mesdk.demo.moduleinterface;

import java.math.BigDecimal;
import java.util.concurrent.TimeUnit;

import com.newland.mtype.event.DeviceEventListener;
import com.newland.mtype.module.common.keyboard.KeyBoardReadingEvent;
import com.newland.mtype.module.common.lcd.DispType;

/**
 * Created by HJP on 2015/8/12.
 */
public interface KeyBoardInterface {
	public void cancelLastReading();

	public byte read();

	public byte read(long readTimeout, TimeUnit timeunit);

	public void readAmt(DispType dispType, String title, String content, int minLength, int maxLength, long timeout, TimeUnit timeunit,
			DeviceEventListener<KeyBoardReadingEvent<BigDecimal>> listener);

	public void readNumber(DispType dispType, String title, String content, int minLength, int maxLength, long timeout, TimeUnit timeunit,
			DeviceEventListener<KeyBoardReadingEvent<BigDecimal>> listener);

	public void readPwd(DispType dispType, String title, String content, int minLength, int maxLength, long timeout, TimeUnit timeunit,
			DeviceEventListener<KeyBoardReadingEvent<String>> listener);

	public void readString(DispType dispType, String title, String content, int minLength, int maxLength, long timeout, TimeUnit timeunit,
			DeviceEventListener<KeyBoardReadingEvent<String>> listener);
}
